#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int removeDuplicates(vector<int>& nums)
    {
        int n = nums[0];
        for (int i = 1; i < nums.size();)
        {
            if (nums[i] == n)
            {
                nums.erase(nums.begin() + i);
            }
            else
            {
                n = nums[i];
                i++;
            }
        }
        return nums.size();
    }
};
int main()
{

	return 0;
}